package jsyf.oa.entity.business;

import com.alibaba.fastjson.JSONObject;

import javax.persistence.Entity;
import javax.persistence.Table;

import jsyf.oa.ientity.BaseEntity;

@Entity
@Table(name = "t_apl_business_copier", schema = "oa", catalog = "")
public class BusinessCopierEntity extends BaseEntity {

    private String mainId;
    private String copyPersonId;
    private String copyPersonName;

    public String getMainId() {
        return mainId;
    }

    public void setMainId(String mainId) {
        this.mainId = mainId;
    }

    public String getCopyPersonId() {
        return copyPersonId;
    }

    public void setCopyPersonId(String copyPersonId) {
        this.copyPersonId = copyPersonId;
    }

    public String getCopyPersonName() {
        return copyPersonName;
    }

    public void setCopyPersonName(String copyPersonName) {
        this.copyPersonName = copyPersonName;
    }

    @Override
    public JSONObject getJSONObject() {
        JSONObject obj = new JSONObject();
        obj.put("ID", getId());
        obj.put("MAIN_ID", getMainId());
        obj.put("COPY_PERSON_ID", getCopyPersonId());
        obj.put("COPY_PERSON_NAME", getCopyPersonName());
        return obj;
    }

    @Override
    public String getTableName() {
        return "t_apl_business_copier";
    }

    @Override
    public JSONObject getJSONColumns() {
        JSONObject obj = new JSONObject();
        obj.put("ID", "id");
        obj.put("MAIN_ID", "mainId");
        obj.put("COPY_PERSON_ID", "copyPersonId");
        obj.put("COPY_PERSON_NAME", "copyPersonName");
        return obj;
    }

}
